package com.netistate.pojo;



import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_demo")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Demo {
	
	private int id;
	private int orders;
	private int state;
	private String model;
	private String seqNo;
	private String license;
	private String demoAddress;
	private String note;
	private String module;
	private String createtime;
	private int nodes;
	private String hardwareSource;
	private String productConfig;
	
	//private int projectid;
	private Project project;
	
	
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}
	
	//private List<DemoHistory> demoHistoryList;
	
	
	//get set
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getSeqNo() {
		return seqNo;
	}
	public void setSeqNo(String seqNo) {
		this.seqNo = seqNo;
	}
	public String getLicense() {
		return license;
	}
	public void setLicense(String license) {
		this.license = license;
	}
	public String getDemoAddress() {
		return demoAddress;
	}
	public void setDemoAddress(String demoAddress) {
		this.demoAddress = demoAddress;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	public String getModule() {
		return module;
	}
	public void setModule(String module) {
		this.module = module;
	}
	public String getProductConfig() {
		return productConfig;
	}
	public void setProductConfig(String productConfig) {
		this.productConfig = productConfig;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	/*public int getProjectid() {
		return projectid;
	}
	public void setProjectid(int projectid) {
		this.projectid = projectid;
	}*/
	public int getOrders() {
		return orders;
	}
	public void setOrders(int orders) {
		this.orders = orders;
	}
	public String getHardwareSource() {
		return hardwareSource;
	}
	public void setHardwareSource(String hardwareSource) {
		this.hardwareSource = hardwareSource;
	}
	public int getNodes() {
		return nodes;
	}
	public void setNodes(int nodes) {
		this.nodes = nodes;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	
	
	
	/*@OneToMany(mappedBy="demo",cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	public List<DemoHistory> getDemoHistoryList() {
		return demoHistoryList;
	}
	public void setDemoHistoryList(List<DemoHistory> demoHistoryList) {
		this.demoHistoryList = demoHistoryList;
	}
	@OneToMany(mappedBy="demo",cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	public Set<DemoHistory> getDemoHistorySet() {
		return demoHistorySet;
	}
	public void setDemoHistorySet(Set<DemoHistory> demoHistorySet) {
		this.demoHistorySet = demoHistorySet;
	}*/
	
	
	
	

}
